package org.me.app.instructor;

import org.me.app.R;
import org.me.app.R.id;
import org.me.app.R.layout;
import org.me.bean.Instructor;
import org.me.bean.InstructorData;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class InstructorProfileActivity extends Activity{
	private TextView tvInsName;
	private TextView tvInsId;
	
	InstructorData instData = new InstructorData();
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.instructorinfor);
		
		Bundle b = getIntent().getExtras();
		instData = b.getParcelable("org.me.bean.InstructorData");
		
		tvInsName = (TextView)findViewById(R.id.tv_instructorname);
		tvInsId = (TextView)findViewById(R.id.tv_instructorid);
		org.me.bean.Instructor ins = instData.getInstructor();
		
		tvInsId.setText(ins.getInstructorId());
		tvInsName.setText(ins.getInstructorName());
		
		Button btShowSchedule = (Button)findViewById(R.id.btn_showschedule);
		btShowSchedule.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				Intent i = new Intent(getApplicationContext(), 
						org.me.app.instructor.TeachingCoursesActivity.class);
				i.putExtra("InstructorData", instData);
				startActivity(i);
				
			}
		});
	}
	
}
